package com.im.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.im.app.mapper.ICodeMapper;
import com.im.app.model.Code;
import com.im.app.service.ICodeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class ICodeImpl extends ServiceImpl<ICodeMapper, Code> implements ICodeService {

    @Resource
    private ICodeMapper iCodeMapper;

    @Override
    public Code getCodeByKamicode(String kamicode) {
        QueryWrapper<Code> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("kamicode",kamicode);
        return iCodeMapper.selectOne(queryWrapper);
    }
}
